-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close block windows when player is too far away #6382
Close block windows when player is too far away #6382
Conversation
Bumps [symfony/filesystem](https://github.com/symfony/filesystem) from 6.4.7 to 6.4.9. - [Release notes](https://github.com/symfony/filesystem/releases) - [Changelog](https://github.com/symfony/filesystem/blob/7.1/CHANGELOG.md) - [Commits](symfony/filesystem@v6.4.7...v6.4.9) --- updated-dependencies: - dependency-name: symfony/filesystem dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
…lesystem-6.4.9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The composer lock file needs removed from the PR and some other API might be nice, but it looks clean.
I am not super familiar with the API implementation so that might take me a min to figure out Do you think we should have some method like setWindowCloseDistance and setting it to 0 would disable the functionality? |
@ShockedPlot7560 @nicholass003 @jasonw4331 I believe I addressed all concerns and included a video of testing the server against a vanilla world I found that in further testing vanilla seems to kick you out of an inventory window > 6 blocks distance so thats what I also updated this PR to do |
I've taking back this PR to try this to be merged. I've made some changes to fix stale reviews but still has question about we have to include this utility. |
I think the whole thing is overengineered. Most likely the only thing needed is to check if the block is still within the player's reach distance. I don't think this should be the Block's responsibility at all. |
Also worth asking if we really want to make an invasive change like this considering the upcoming #6533. |
Closing this as I think the solution is way too complicated for the requirements. |
Introduction
If a player is inside of a container window and is moved over 6 blocks from the container the window will automatically be closed
In vanilla minecraft when I was testing this it closed the window after be moving 12 blocks(I could have miscounted) so that is what I implemented here
By running the following this change can be disabled
$inventory->setMaxDistanceFromContainer(0)
Relevant issues
This is a resolution for the issue
#6349
Test
https://file.io/mphsWsJrFfcy